package com.xinqing.test.modle;

import com.alibaba.fastjson.JSON;


import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author LiuMing
 * @date 2019/11/13
 * @description
 */

public class TaskParam {

    /**
     * 请求ID，marketing#ymd#taskId
     */
    private String requestId;
    /**
     * 推送类型，可选值为notification、message、email、splash、finance、intelligence。分别表示：消息推送（notification）
     * ，短信（message），邮件（email），闪屏（splash），金融数据中心（finance），智能运营（intelligence）
     */
    @NotNull
    @Pattern(regexp = "notification|message|email|splash|finance|intelligence", message = "platform不符合要求!")
    private String platform;
    /**
     * 设备类型，当前可选值： ios或android。如只推送ios，则值为"ios"；若都推送，以英文逗号分隔，即值为"ios,android"
     */
    @NotNull
    @Pattern(regexp = "[1-3]", message = "deviceType不符合要求!", groups = ExcludeSMS.class)
    private String deviceType;
    /**
     * 渠道，APK安装渠道，如huawei，oppo等
     */
    private String channel;
    /**
     * 客群filter表达式
     */
    @NotNull(message = "filter不能为空!")
    private String filter;
    /**
     * 营销任务taskId
     */

    private String taskId;
    /**
     * 推送产品名
     */

    private String productName;
    /**
     * 短信推送业务归属，当前可选值： loan，card，licai，wlxjd，wldh
     */
    private String serviceType;
    /**
     * 任务目标筛选人数，为0表示推送客群内所有设备或用户，非0表示推送指定数量
     */
    @Min(value = 0, message = "customerCnt不符合要求!")
    private Integer customerCnt = 0;
    /**
     * 邮件推送标识，用于邮件平台后期邮件归档使用
     */
    private String msgLabel;
    /**
     * 互斥模板，多个用英文逗号分隔
     */
    private String tplFilter;
    /**
     * 推送类型
     */
    @NotNull
    @Pattern(regexp = "[0-1]", message = "pushType不符合要求!")
    private String pushType;
  /*  *//**
     * 自定义变量匹配表
     *//*
    private String varTbl;
    *//**
     * 自定义变量匹配字段
     *//*
    private String varFields;
    *//**
     * 自定义变量表关联字段
     *//*
    private String varJoinFlag;*/
    /**
     * 金融数据中心使用，返回数据结构中包含营销任务编码
     */
/*    private String marketCode;
    *//**
     * 金融数据中心使用，返回数据结构中包含营销任务名称
     *//*
    private String marketName;
    *//**
     * 金融数据中心使用，返回数据结构中包含营销任务描述信息
     *//*
    private String marketDesc;*/
    /**
     * iOS产品版本号筛选类型，0：指定；1：排除；2：大于等于；3：小于等于
     */
    private String productVerOptionIos;
    /**
     * Android产品版本号筛选类型，0：指定；1：排除；2：大于等于；3：小于等于
     */
    private String productVerOptionAnd;
    /**
     * iOS产品版本号
     */
    private String productVerIos;
    /**
     * Android产品版本号
     */
    private String productVerAnd;
    /**
     * iOS操作系统版本号筛选类型，0：指定；1：排除；2：大于等于；3：小于等于
     */
    private String systemVerOptionIos;
    /**
     * Android操作系统版本号筛选类型，0：指定；1：排除；2：大于等于；3：小于等于
     */
    private String systemVerOptionAnd;
    /**
     * iOS操作系统版本号
     */
    private String systemVerIos;
    /**
     * Android操作系统版本号
     */
    private String systemVerAnd;
    /**
     * 仅短信推送以及消息推送预计算模块使用，是否系统推荐筛选客群 0否 1是 2全量客群
     */
    @NotNull
    private String isRecommend;
    /**
     * 回调地址
     */

    private String callBackUrl;

    private String targetMediaRequest;

    private String template;

    public interface RequireCallbackUrl {
    }

    public interface SuperNotSupportRecommend {
    }

    public interface NormalNotSupportPlatform {
    }

    public interface ExcludeSMS {
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getFilter() {
        return filter;
    }

    public void setFilter(String filter) {
        this.filter = filter;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public Integer getCustomerCnt() {
        return customerCnt;
    }

    public void setCustomerCnt(Integer customerCnt) {
        this.customerCnt = customerCnt;
    }

    public String getMsgLabel() {
        return msgLabel;
    }

    public void setMsgLabel(String msgLabel) {
        this.msgLabel = msgLabel;
    }

    public String getTplFilter() {
        return tplFilter;
    }

    public void setTplFilter(String tplFilter) {
        this.tplFilter = tplFilter;
    }

    public String getPushType() {
        return pushType;
    }

    public void setPushType(String pushType) {
        this.pushType = pushType;
    }

   /* public String getVarTbl() {
        return varTbl;
    }

    public void setVarTbl(String varTbl) {
        this.varTbl = varTbl;
    }

    public String getVarFields() {
        return varFields;
    }

    public void setVarFields(String varFields) {
        this.varFields = varFields;
    }

    public String getVarJoinFlag() {
        return varJoinFlag;
    }

    public void setVarJoinFlag(String varJoinFlag) {
        this.varJoinFlag = varJoinFlag;
    }

    public String getMarketCode() {
        return marketCode;
    }

    public void setMarketCode(String marketCode) {
        this.marketCode = marketCode;
    }

    public String getMarketName() {
        return marketName;
    }

    public void setMarketName(String marketName) {
        this.marketName = marketName;
    }

    public String getMarketDesc() {
        return marketDesc;
    }

    public void setMarketDesc(String marketDesc) {
        this.marketDesc = marketDesc;
    }*/

    public String getProductVerOptionIos() {
        return productVerOptionIos;
    }

    public void setProductVerOptionIos(String productVerOptionIos) {
        this.productVerOptionIos = productVerOptionIos;
    }

    public String getProductVerOptionAnd() {
        return productVerOptionAnd;
    }

    public void setProductVerOptionAnd(String productVerOptionAnd) {
        this.productVerOptionAnd = productVerOptionAnd;
    }

    public String getProductVerIos() {
        return productVerIos;
    }

    public void setProductVerIos(String productVerIos) {
        this.productVerIos = productVerIos;
    }

    public String getProductVerAnd() {
        return productVerAnd;
    }

    public void setProductVerAnd(String productVerAnd) {
        this.productVerAnd = productVerAnd;
    }

    public String getSystemVerOptionIos() {
        return systemVerOptionIos;
    }

    public void setSystemVerOptionIos(String systemVerOptionIos) {
        this.systemVerOptionIos = systemVerOptionIos;
    }

    public String getSystemVerOptionAnd() {
        return systemVerOptionAnd;
    }

    public void setSystemVerOptionAnd(String systemVerOptionAnd) {
        this.systemVerOptionAnd = systemVerOptionAnd;
    }

    public String getSystemVerIos() {
        return systemVerIos;
    }

    public void setSystemVerIos(String systemVerIos) {
        this.systemVerIos = systemVerIos;
    }

    public String getSystemVerAnd() {
        return systemVerAnd;
    }

    public void setSystemVerAnd(String systemVerAnd) {
        this.systemVerAnd = systemVerAnd;
    }

    public String getIsRecommend() {
        return isRecommend;
    }

    public void setIsRecommend(String isRecommend) {
        this.isRecommend = isRecommend;
    }

    public String getCallBackUrl() {
        return callBackUrl;
    }

    public void setCallBackUrl(String callBackUrl) {
        this.callBackUrl = callBackUrl;
    }

    public String getTargetMediaRequest() {
        return targetMediaRequest;
    }

    public void setTargetMediaRequest(String targetMediaRequest) {
        this.targetMediaRequest = targetMediaRequest;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}

